/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package EA_Model.IEC61970.Core.impl;

import EA_Model.IEC61970.Core.CorePackage;
import EA_Model.IEC61970.Core.PsrList;

import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;

import org.eclipse.emf.ecore.impl.ENotificationImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Psr List</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link EA_Model.IEC61970.Core.impl.PsrListImpl#getTypePSRList <em>Type PSR List</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class PsrListImpl extends IdentifiedObjectImpl implements PsrList {
	/**
	 * The cached value of the '{@link #getTypePSRList() <em>Type PSR List</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getTypePSRList()
	 * @generated
	 * @ordered
	 */
	protected EA_Model.IEC61970.Domain.String typePSRList;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected PsrListImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return CorePackage.Literals.PSR_LIST;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EA_Model.IEC61970.Domain.String getTypePSRList() {
		if (typePSRList != null && typePSRList.eIsProxy()) {
			InternalEObject oldTypePSRList = (InternalEObject)typePSRList;
			typePSRList = (EA_Model.IEC61970.Domain.String)eResolveProxy(oldTypePSRList);
			if (typePSRList != oldTypePSRList) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, CorePackage.PSR_LIST__TYPE_PSR_LIST, oldTypePSRList, typePSRList));
			}
		}
		return typePSRList;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EA_Model.IEC61970.Domain.String basicGetTypePSRList() {
		return typePSRList;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setTypePSRList(EA_Model.IEC61970.Domain.String newTypePSRList) {
		EA_Model.IEC61970.Domain.String oldTypePSRList = typePSRList;
		typePSRList = newTypePSRList;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, CorePackage.PSR_LIST__TYPE_PSR_LIST, oldTypePSRList, typePSRList));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case CorePackage.PSR_LIST__TYPE_PSR_LIST:
				if (resolve) return getTypePSRList();
				return basicGetTypePSRList();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case CorePackage.PSR_LIST__TYPE_PSR_LIST:
				setTypePSRList((EA_Model.IEC61970.Domain.String)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case CorePackage.PSR_LIST__TYPE_PSR_LIST:
				setTypePSRList((EA_Model.IEC61970.Domain.String)null);
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case CorePackage.PSR_LIST__TYPE_PSR_LIST:
				return typePSRList != null;
		}
		return super.eIsSet(featureID);
	}

} //PsrListImpl
